<div class="detail-ideal" style="border-bottom: #400080 solid 1px; margin-left: 0px;">
<?php
 $date = DateTime::createFromFormat('Y-m-d H:i:s', $result[0]->Ngay);
 
    if(isset($result[0]->TieuDe) && !empty($result[0]->TieuDe)){
    echo "<div class='title-ideal' style='font-size: 16px; font-weight:bold; float: left; width: 97%; color: #FF9933;' >".$result[0]->TieuDe."</div>";
    }
    echo "<div class='ngay-author_ideal' style='margin-left: 20px; width: 95%; float: left;' ><b>".$user."</b> - ".$date->format('Y/m/d')."</div>";
    if(isset($result[0]->MoTa) && !empty($result[0]->MoTa)){
        echo "<div class='mota-ideal' style='font-size: 16px; font-weight:bold;' >".$result[0]->MoTa."</div>";       
    }
    
    if(isset($result[0]->NoiDung) && !empty($result[0]->NoiDung)){
        echo "<div class='content-ideal' style='font-size: 16px; font-style: bold;  text-align: justify; ' >".$result[0]->NoiDung."</div>";       
    }
    
    if(isset($result[0]->UrlFile) && !empty($result[0]->UrlFile)){ ?>
        <div class='file-ideal' style='font-size: 16px; font-style: bold;  text-align: right; ' ><a href='<?php echo base_url('nhanvien/ideal/download/'.$result[0]->UrlFile); ?>' >File đính kèm</a> </div>
    <?php 
    }    

?>
</div> 



<form name="form-comment" action="<?php echo base_url("nhanvien/ideal/docomment"); ?>" method="Post">
<input type="hidden" name="diemdanhgia" value="<?php if(isset($result[0]->DiemDanhGia) && !empty($result[0]->DiemDanhGia)){
    echo $result[0]->DiemDanhGia;
    }else{
        echo "0";
    }  ?>"/>
<input type="hidden" name="maytuong" value="<?php echo $result[0]->MaYTuong; ?>"/>
<div style="margin: 10px 0; padding-left: 10px; float: left; width: 91%;border-radius: 5px; height: 35px; background-color: silver; font-weight: bold; font-size: 16px; ">Comment</div>
<img src="" />
<textarea name="noidung" rows="7" style="max-width: 92%; width: 92%; float: left;"></textarea>
<?php if($danhgia == false){ ?>
<div style="margin: 10px; float: left; width: 97%; font-weight: bold; font-size: 16px; ">Đánh Giá</div>

<div style="width: 97%; float: left;">

<label style="float: left; width: 20%; font-weight: bold;">Điểm Sáng Tạo</label>
<select name="diemsangtao" style="float: left; width: 25%; margin-right: 20px; " >
<option value="">Điểm</option>
<?php for($i = 0; $i <= 5; $i= $i + 0.5){
            echo "<option value='".$i."'>".$i."</option>";
        }
    ?>
</select>

<label style="float: left; width: 20%; font-weight: bold;">Điểm Mới Lạ Độc Đáo</label>
<select name="diemmoiladocdao" style="float: left; width: 25%;  margin-right: 20px;" >
<option value="">Điểm</option>
<?php for($i = 0; $i <= 5; $i= $i + 0.5){
            echo "<option value='".$i."'>".$i."</option>";
        }
    ?>
</select>
</div>
<div style="width: 97%; float: left;">
<label style="float: left; width: 20%; font-weight: bold;">Điểm Tính Khả Dụng</label>
<select name="diemtinhkhadung" style="float: left; width: 25%;  margin-right: 20px; " >
<option value="">Điểm</option>
<?php for($i = 0; $i <= 5; $i= $i + 0.5){
            echo "<option value='".$i."'>".$i."</option>";
        }
    ?>
</select>

<label style="float: left; width: 20%; font-weight: bold;">Điểm Phan Tich</label>
<select name="diemphantich" style="float: left; width: 25%;  margin-right: 20px; " >

<option value="">Điểm</option>
<?php for($i = 0; $i <= 5; $i= $i + 0.5){
            echo "<option value='".$i."'>".$i."</option>";
        }
    ?>
</select>
</div>
<?php } 
echo "<div style='width: 92%; float: left;'>";
if(isset($result[0]->DiemDanhGia) && !empty($result[0]->DiemDanhGia)){?>
<div class='title' style=' float: right; height: 30px; margin-top: 10px; font-size: 16px; font-weight: bold; float: left; ' > Tổng điểm của ý tưởng: <?php echo $result[0]->DiemDanhGia; ?></div>
 <?php   }  ?>
<input type="submit" value="Comment" name="comment" style=" background-color: #3399FF; float: right; height: 30px; width: 100px; margin-top: 10px;" /></div>

</form>

 
 <div class="comment" style="float: left; margin-top: 10px; width: 97%;">
 
<?php
    foreach($comments as $comment){ ?>
    <div style="margin-bottom: 10px; float: left; width: 100%;">
        <img style="float: left; max-width: 15%;" width="80px"  height="80px" src="<?php echo base_url('resources/hoso').'/'.$comment->AnhDaiDien; ?>" />
        <div style="float: left; width:84%; border: 2px solid silver; margin-left: 5px; min-height: 76px; ">
        <div class='name-comment' style="width: 100%; height: 30px; line-height: 30px; float: left; font-weight: bold; font-size: 14px; margin-left: 10px;"><?php echo $comment->TenHoSo; ?></div>
        <div style="width: 96%; margin-left: 2%;"><hr /></div>
        <div class='name-comment' style="width: 100%; float: left; margin-left: 10px; word-wrap: break-word;"><?php echo $comment->NoiDung; ?></div>
        </div>
        </div>
<?php    } 
?>
</div>
 
<script>
function checkPoint(point){
    
    
}
</script>